package cn.fancy.sdk.pay.entity;

import org.json.JSONException;
import org.json.JSONObject;

import cn.fancy.sdk.entity.JsonParseInterface;

public class Pay implements JsonParseInterface{
	 public static final String _role = "a";   
	 public static final String _roleId = "b";
	 public static final String _server = "c";
	 public static final String _serverId = "d";
	 public static final String _money = "e";
	 public static final String _paymentId = "f";
	 public static final String _callBackInfo = "g";
	 
	 
	 /**
	  * 帐号
	  * */
	 private String plat_user_name;
	 /**
	  * 用户ID
	  * */
	 private String uid;
	 /**
	  * 游戏ID
	  * */
	 private String game_id;
	 /**
	  * 渠道ID
	  * */
	 private String channel_id;
	 /**
	  * 
	  * */
	/**
	 * 游戏角色
	 */
	private String role;
	/**
	 * 角色Id
	 */
	private String roleId;
	/**
	 * 游戏区服 
	 */
	private String server;
	/**
	 * 服务器Id  
	 */
	private String serverId;
	/**
	 * 充值金额 
	 */
	private double money;
	/**
	 * 支付渠道Id  
	 */
	private int paymentId;
	
	
	
	/**
	 * 厂商自定义参数
	 */
	private String callBackInfo;
	
  
	public void setRole(String role) {
		this.role = role;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public void setServer(String server) {
		this.server = server;
	}

	public void setServerId(String serverId) {
		this.serverId = serverId;
	}

	public void setMoney(double money) {
		this.money = money;
	}

	public void setPaymentId(int paymentId) {
		this.paymentId = paymentId;
	}
	

	public void setCallBackInfo(String callBackInfo) {
		this.callBackInfo = callBackInfo;
	}

	public int getPaymentId() {
		return paymentId;
	}

	@Override
	public JSONObject buildJson() {
		// TODO Auto-generated method stub
		try 
		{
			JSONObject json = new JSONObject();
			json.put(_role, role);
			json.put(_roleId, roleId);
			json.put(_server, server);
			json.put(_serverId, serverId);
			json.put(_money, money);
			json.put(_paymentId, paymentId);
			json.put(_callBackInfo, callBackInfo);
			return json;
		} 
		catch (JSONException e) 
		{
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public void parseJson(JSONObject json) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String getShortName() {
		// TODO Auto-generated method stub
		return "Pay";
	}
   
}
